class NOTEBOOK

inherit
	GTK

insert
	GTKTESTER
	
creation
	make

feature
	
	make is
		local
			x: GLADE_XML
		do
			gtktester_initialize
			gtk.initialize
			create x.make (once "notebook.glade")
			window := x.get_window (once "window")
			window.connect_agent_to_delete_event_signal (agent quit)
			window.show
			button1 := x.get_button (once "button1")
			button1.connect_agent_to_clicked_signal (agent button_clicked(?, "One"))
			button2 := x.get_button (once "button2")
			button2.connect_agent_to_clicked_signal (agent button_clicked(?, "Two"))
			button3 := x.get_button (once "button3")
			button3.connect_agent_to_clicked_signal (agent button_clicked(?, "Three"))
			gtk.run_main_loop
		end

feature -- Widgets

	window: GTK_WINDOW
			-- the window

	button1, button2, button3: GTK_BUTTON

feature -- Signal handlers

	quit (w: GTK_WIDGET; e: GDK_EVENT): BOOLEAN is
		do
			gtk.quit
		end

	button_clicked (button: GTK_BUTTON; msg: STRING) is
		do
			print ("%NClicked handler '" + msg + "' called!%N")
		end

end -- class NOTEBOOK

